package com.tao.controller;

import com.tao.pojo.Address;
import com.tao.pojo.Category;
import com.tao.pojo.vo.ResponseResult;
import com.tao.service.AddressService;
import com.tao.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/client/category")
public class ClientCategoryController {

    @Autowired
    private CategoryService categoryService;
   /*获取地址列表*/
    @GetMapping("/list")
    public Object list(){
        List<Category> list = categoryService.list();
        return ResponseResult.success(list);
    }
}
